fix: neli ACK parsing, MCP error codes, disconnect log#99
Merged
Conversation
… log Three bugs found during 2026-03-20 UAT session: 1. neli 0.7 ACK parsing: recv_netlink_ack matched NlPayload::Payload which never matches for NLMSG_ERROR — neli 0.7 parses these into NlPayload::Ack/Err variants. OS route add/remove silently failed. 2. MCP error codes: all daemon errors (peer not found, invalid CIDR) were wrapped as internal_error (-32603). Now uses invalid_params (-32602) since these are user-input validation failures. 3. API-initiated peer disconnect produced no log line. Added info-level log in do_disconnect so the event appears in the ring buffer. Also: route display uses "via" instead of Unicode arrow, stale subcommand references removed from help text. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The log "Role resolved: name=X role=entry" was confusing because it displayed the local node's resolved role next to the peer's name, reading as if the peer's role was entry. Changed to "Role resolved: peer=X local_role=entry" to prevent misreading. Also: route display uses "via" instead of arrow, stale subcommand reference removed from help text. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7049ebc to
a42181a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recv_netlink_ackmatchedNlPayload::Payloadwhich never matches forNLMSG_ERRORin neli 0.7. Now correctly matchesNlPayload::Ack/Err. OS route add/remove was silently failing.invalid_params(-32602) instead ofinternal_error(-32603)→replaced withvia(readable in all fonts/sizes)How to verify
wallhack route_addwith a manual CIDR — verify no "Unexpected payload in ACK" in logs andip routeshows the kernel routewallhack disconnect <peer>— verify "Peer disconnected: ... (via API)" appears inwallhack logswallhack route_addwith nonexistent peer — verify error code is -32602 not -32603🤖 Generated with Claude Code